package edu.tyut.game.logic.network

import edu.tyut.game.logic.model.UserTotalRoundsRank
import edu.tyut.game.logic.model.UserWinRateRank
import edu.tyut.game.logic.model.WebResult
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Path

interface FlyingFlowerOrderService {

    @GET("/flyingFlowerOrderGame/getContents/{word}")
    fun getContentsByWord(@Path("word") word: String): Call<WebResult<List<String>>>
    @GET("/flyingFlowerOrderGame/gameOver/{uid}")
    fun gameOver(@Path("uid") uid: Int): Call<WebResult<Boolean>>
    @GET("/flyingFlowerOrderGame/isExistPoem/{content}")
    fun isExistPoem(@Path("content") content: String): Call<WebResult<Boolean>>

    // 埋点
    @GET("/flyingFlowerOrderGame/win/{uid}")
    fun win(@Path("uid") uid: Int): Call<WebResult<String>>
    @GET("/flyingFlowerOrderGame/lose/{uid}")
    fun lose(@Path("uid") uid: Int): Call<WebResult<String>>

    // 排行
    @GET("/flyingFlowerOrderGame/getWinRateRank")
    fun getWinRateRank(): Call<WebResult<List<UserWinRateRank>>>
    @GET("/flyingFlowerOrderGame/getTotalRoundsRank")
    fun getTotalRoundsRank(): Call<WebResult<List<UserTotalRoundsRank>>>

    @GET("/flyingFlowerOrderGame/getWinRateRankTotalRoundsRank")
    fun getWinRateRankTotalRoundsRank(): Call<WebResult<Pair<List<UserWinRateRank>, List<UserTotalRoundsRank>>>>

}